//
//  YMConversation.h
//  YMIM
//
//  Created by reyzhang on 2022/3/21.
//

#import <Foundation/Foundation.h>
#import "YMGroupInfo.h"
#import "YMGroupUserInfo.h"
#import "YMMessageInfo.h"
#import "YMCommonDefs.h"
#import "YMMessage.h"


NS_ASSUME_NONNULL_BEGIN

/**
 * IM 会话数据模型
 */
@interface YMConversation : NSObject

@property (nonatomic, strong) YMGroupInfo *groupInfo;
@property (nonatomic, strong) NSArray<YMGroupUserInfo *> *userList;
@property (nonatomic, strong) NSMutableArray<YMMessageInfo *> *messageList;


@property (nonatomic, strong,readonly) NSString *targetId; //目标id
@property (nonatomic, strong,readonly) NSString *targetName; //目标名称
@property (nonatomic, strong,readonly) NSString *targetPortrait; //目标图像
@property (nonatomic, assign,readonly) YMConversationType conversationType;


/**
 * 根据发送消息模型转换Conversation对象
 */
+ (instancetype)convertWithMessage:(YMMessage *)message;



@end

NS_ASSUME_NONNULL_END
